var validatorBankAccount = function(rule, value, callback) {
  if (value === '') {
    callback(new Error('请输入新收款账号'))
  } else if (!/^([1-9]{1})(\d{15}|\d{16}|\d{18})$/.test(value)) {
    callback(new Error('请输入正确的收款账号'))
  } else {
    callback()
  }
}
const validate = {
  name1: [
    {
      required: true,
      message: '请选择收款渠道',
      trigger: 'change'
    }
  ],
  name3: [
    {
      required: true,
      trigger: 'change',
      validator: validatorBankAccount
    }
  ]
}
export default validate
